#!/usr/bin/bash

read -p "请输入一个路径：" path

cd $path

files=`ls`

n=1
for f in $files
do
    newname='echo $f | sad 's/.*/$n&/''
    mv $f $newname
    n=$((n+1))
done